function ageF(bDay){
 now = new Date()
 bD = bDay.split('-');
 if(bD.length==3){
   born = new Date(bD[2], bD[0]*1-1, bD[1]);
   years = Math.floor((now.getTime() - born.getTime()) / (365.25 * 24 * 60 * 60 * 1000));
   return years;
 }
}

function openWindow(url,width,height,options,name) {
                width = width ? width : 570;
                height = height ? height : 400;
                options = options ? options : 'resizable=yes';
                name = name ? name : 'openWindow';
                window.open(
                    url,
                    name,
                    'screenX='+(screen.width-width)/2+',screenY='+(screen.height-height)/2+',width='+width+',height='+height+','+options
                )
        }